<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	
	<title>{$pageTitle}</title>
	
	<!-- head --><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	{include file="head.tpl"}
	
</head>

<body>

<!-- body_js -->
{include file="body_js.tpl"}

	<div id="wrap">
		
		<!-- header -->
		{include file="header.tpl"}
		<div id="body">
			
			<div id="body_left">
			
				<!-- breadcrumbs -->
				{include file="breadcrumbs.tpl"}
				
				<!-- filter -->
				<form action="poems.php" method="get">
				
				<p>
					<span style="display:block; width:150px; float:left; padding-right:10px;">
					<strong>{l s='Categoría:'} </strong><br />
					<select name="category" style="width:150px">
						<option value="">- {l s='Todas'} -</option>
						{section name=category loop=$categories}
							<option value="{$categories[category].id}" {if $selectedCategory eq $categories[category].id} selected="selected"{/if}>{$categories[category].name}</option>
						{/section}
					</select>
					</span>
					<span style="display:block; width:150px; float:left; padding-right:10px;">
					<strong>Autor: </strong><br />
					<select name="author" style="width:150px;">
						<option value="">- {l s='Todos'} -</option>
						{section name=author loop=$authors}
							<option value="{$authors[author].username}" {if $smarty.get.author eq $authors[author].username} selected="selected"{/if}>{$authors[author].username} ({$authors[author].fullname})</option>
						{/section}
					</select>
					</span>
					<span style="display:block; width:150px; float:left; padding-right:15px;">
					<strong>{l s='Palabra:'} </strong><br />
						<input type="text" name="search" value="{$smarty.get.search}" style="width:150px;" />
					</span>
					<span style="display:block; width:80px; float:left;">
					&nbsp;<br />
					<input type="submit" value="{l s='Buscar'}" />
					</span>
					<span style="display:block; clear:both"></span>
				</p>
				</form>
				<!-- end filter -->
				
				{if $leftPoems eq "" and $rightPoems eq ""}
				<p>
						Una din doua. Ori aceasta categorie nu contine poezii, 
						ori cautarea nu a dat nici un rezultat.
				</p>
				{else}
				
				<div style="float:left; width:300px;">
					{section name=poem loop=$leftPoems}
					<div class="poem">
						<div class="title">
						<a href="{$leftPoems[poem].link}">
						{$leftPoems[poem].title}
						</a>
						</div>
						<p class="author">by <a href="{$smarty.const.BASE_URL}member.php?name={$leftPoems[poem].author}">{$leftPoems[poem].author}</a></p>
						<div class="body">
						  <p>{$leftPoems[poem].poem}</p>
				    </div>
					</div>
					
					{if $smarty.section.poem.index == 1 && $rogrup_ads_poems_list ne ""}
						<div id="rogrup_ads_poems_list" class="rogrup_ads_poems_list">
							{$rogrup_ads_poems_list}
						</div>
					{/if}
					
					{/section}
				</div>
				<div style="float:left; width:300px; padding-left: 15px;">
					{section name=poem loop=$rightPoems}
					<div class="poem">
						<div class="title">
						<a href="{$rightPoems[poem].link}">
						{$rightPoems[poem].title}
						</a>
						</div>
						<p class="author">by <a href="{$smarty.const.BASE_URL}member.php?name={$rightPoems[poem].author}">{$rightPoems[poem].author}</a></p>
						<div class="body">
						  <p>{$rightPoems[poem].poem}</p>
				    </div>
					</div>
					{/section}
				</div>
				<div class="clearer"></div>
				<p class="paging">{l s='Páginas'} {$paging_first} {$paging_prev} {$paging_nav} {$paging_next} {$paging_last}</p>
				{/if}
				
			</div>
			
			<div id="body_right">
			  <!-- body_right -->
				{include file="body_right.tpl"}
			</div>
			<div class="clearer"></div>
		</div>
</div>
	<!-- footer -->
	{include file="footer.tpl"}
</body>
</html>
